<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ page isELIgnored="false"%>
<%@ include file="../common/taglibs.jsp"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!doctype html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="renderer" content="webkit">
    <title>代理商补贴查询</title>
    <link rel="icon" href="favicon.ico" type="image/x-icon"/>
    <!-- 当前页面样式 -->
    <link rel="stylesheet" href="<s:url value="/css/common.css"/>"/>
    <!-- 当前页面样式 END -->
    <script type="text/javascript" src="<c:url value="/js/jquery-1.3.2.js" />"></script>
	<script type="text/javascript" src="<c:url value="/js/common.js" />"></script>
    <script type="text/javascript">
    function checkSubmit(){
    		$("#queryUserForm").attr("action","<%=basePath%>/agentSubsidy/queryAgentSubsidy.ct");
    		$("#queryUserForm").submit();
    		$("#queryBtnId").attr("disabled","true");
    }
    function exportSubmit(){	
		$("#queryUserForm").attr("action","<%=basePath%>/agentSubsidy/exportAgentSubsidy.ct");
		$("#queryUserForm").submit();
    }
</script>
</head>
<body>
<s:form id="queryUserForm" action="" method="post" theme="simple">
<table class="tb">
    <tbody>
        <tr class="tb-line">
            <td class="tb-td" colspan="4"><div class="tb-h2">POS收单运营管理平台</div></td>
        </tr>
         <tr class="tb-line">
            <td class="tb-td" colspan="4"><div class="tb-h3">代理商补贴查询</div></td>
        </tr>
         <tr class="tb-line">
            <td width="12%" style="min-width: 150px" align="right" class="tb-td">
                <div class="tb-h4">商户号：</div>
            </td>
            <td class="tb-td">
                <label class="tb-input-normal"><s:textfield id="merNo" name="searchCondition.merNo" cssClass="queryWidth" /></label>
            </td>
            <td width="12%" style="min-width: 150px" align="right" class="tb-td">
                <div class="tb-h4">商户名称：</div>
            </td>
            <td class="tb-td">
                <label class="tb-input-normal"><s:textfield id="merName" name="searchCondition.merName" cssClass="queryWidth" /></label>
            </td>
         </tr>
           <tr class="tb-line">
            <td width="12%" style="min-width: 150px" align="right" class="tb-td">
                <div class="tb-h4">法人名称：</div>
            </td>
            <td class="tb-td">
                <label class="tb-input-normal"><s:textfield id="certif" name="searchCondition.certif" cssClass="queryWidth" /></label>
            </td>
            <td width="12%" style="min-width: 150px" align="right" class="tb-td">
                <div class="tb-h4">法人身份证：</div>
            </td>
            <td class="tb-td">
                <label class="tb-input-normal"><s:textfield id="certifNo" name="searchCondition.certifNo" cssClass="queryWidth" /></label>
            </td>
         </tr>
           <tr class="tb-line">
            <td width="12%" style="min-width: 150px" align="right" class="tb-td">
                <div class="tb-h4">终端序列号：</div>
            </td>
            <td class="tb-td">
                <label class="tb-input-normal"><s:textfield id="deviceCd" name="searchCondition.deviceCd" cssClass="queryWidth" /></label>
            </td>
            <td width="12%" style="min-width: 150px" align="right" class="tb-td">
                <div class="tb-h4">商户结算卡号：</div>
            </td>
            <td class="tb-td">
                <label class="tb-input-normal"><s:textfield id="merBankAccount" name="searchCondition.merBankAccount" cssClass="queryWidth" /></label>
            </td>
         </tr>
   <tr class="tb-line">
            <td width="12%" style="min-width: 150px" align="right" class="tb-td">
                <div class="tb-h4">营业执照号码：</div>
            </td>
            <td class="tb-td">
                <label class="tb-input-normal"><s:textfield id="busiLiceNo" name="searchCondition.busiLiceNo" cssClass="queryWidth" /></label>
            </td>
         </tr>
        <tr class="tb-line">
            <td class="tb-td line-submit" align="right" colspan="4">
                <label class="tb-input-submit">
                    <input id="queryBtnId" type="button" value="查   询" onclick="return checkSubmit();" />
                </label>
                <label class="tb-input-submit">
                    <s:if 
					 test="#request.agent != null && #request.agent.size>0">
					   		<input id="szPower" type="button"
							value="导 出" onclick="return exportSubmit();"/>
					   
					</s:if>
					<s:else>
					 	<input id="szPower" disabled="disabled" value="导  出" type="button" /> 
					</s:else>
                </label>
            </td>
            
        </tr>
        <s:if test="#request.searchRsList != null && #request.searchRsList.size>0">
					<tr class="tb-line">
						<td class="tb-td paging"  align="left" colspan="4"> <page:pageCount
								max_pages="11" totalPage="${requestScope.totalPage}"
								currentPage="${requestScope.currentPage}"
								action="${rootPath}/agentSubsidy/queryAgentSubsidy.ct?currentPage=" />

						</td>
					</tr>
	</s:if>
    </tbody>
    
</table>

<div class="big-tb">
    <table class="tb" style="width: 100%;">
        <thead>
            <tr class="tb-line">
                <th class="tb-th" colspan="17">代理商补贴查询</th>
            </tr>
            <tr class="tb-line bg-gray">
                		<th class="tb-th">商户号</th>
						<th class="tb-th">商户名称</th>
						<th class="tb-th">法人代表</th>
						<th class="tb-th">法人身份证</th>
						<th class="tb-th">营业执照号码</th>
						<th class="tb-th">直属代理商名称</th>
						<th class="tb-th">一级代理商名称</th>
						<th class="tb-th">所属大区</th>
						<th class="tb-th">商户结算账户</th>
						<th class="tb-th">商户结算账户名称</th>
						<th class="tb-th">商户结算银行</th>
						<th class="tb-th">终端序列号</th>
						<th class="tb-th">总金额</th>
						<th class="tb-th">总笔数</th>
						<th class="tb-th">交易月份</th>
						<th class="tb-th">商户状态</th>
						<th class="tb-th">终端状态</th>
					
            </tr>
        </thead>
        <tbody>
			<s:iterator value="#request.agent" status="stat" id="agent">
					<tr  class="tb-line"  >
					        <td class="tb-td">
							<s:property value="#agent.mchtCd"/>
							</td>
							<td class="tb-td">
							<s:property value="#agent.nameBusi"/>
							</td>
							<td class="tb-td">
							<s:property value="#agent.certif"/>
							</td>
							<td class="tb-td">
							<s:property value="#agent.certifNo"/>
							</td>
							<td class="tb-td">
							<s:property value="#agent.busiLiceNo"/>
							</td>
							<td class="tb-td">
							<s:property value="#agent.agentName"/>
							</td>
							<td class="tb-td">
							<s:property value="#agent.oneAgentName"/>
							</td>
							<td class="tb-td">
							<s:property value="#agent.companyName"/>
							</td>
							<td class="tb-td">
							<s:property value="#agent.merchantBankAccount"/>
							</td>
							<td class="tb-td">
							<s:property value="#agent.merchantBankAccountName"/>
							</td>
							<td class="tb-td">
							<s:property value="#agent.merchantBankName"/>
							</td>
							<td class="tb-td">
							<s:property value="#agent.deviceCd"/>
							</td>
							<td class="tb-td">
							<s:property value="#agent.allAmt"/>
							</td>
							<td class="tb-td">
							<s:property value="#agent.allCount"/>
							</td>
							<td class="tb-td">
							<s:property value="#agent.transMonth"/>
							</td>
							<td class="tb-td">
							<s:if test="#agent.merinfoStatus=='01'">正常   </s:if>
							<s:if test="#agent.merinfoStatus=='02'">注销   </s:if>
							<s:if test="#agent.merinfoStatus=='03'">冻结  </s:if>
<!-- 							<S:PROPERTY VALUE="#AGENT.MERINFOSTATUS"/> -->
							</td>
							<td class="tb-td">
							<s:if test="#agent.terminalStatus=='01'">正常   </s:if>
							<s:if test="#agent.terminalStatus=='02'">已解绑 </s:if>
							<s:if test="#agent.terminalStatus=='03'">冻结  </s:if>
<%-- 							<s:property value="#agent.terminalStatus"/> --%>
							</td>
							
				     </tr>
		    </s:iterator>
        </tbody>
    </table>
</div>
</s:form>

<s:if test="#request.msg !=null">
		<script language="javascript">
			alert("${request.msg}");
		</script>
	</s:if>
</body>
</html>